﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "pickmovez.h"
#include "lua_script.h"
#include "codeeditor.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
private slots:
    void on_pushButton_connect_clicked();

    void on_pushButton_disconnect_clicked();

    void updatejoint(QVector<double> joint);
    void updatePos(QVector<double> pos);
    void updateacc(float acc);
    void updatedacc(float dacc);
    void updateProspeed(float speed);
    void updateJogmode(int md);
    void slot_refresh();
    void movej(QVector<double> targ,QString v,QString z,QString t,QString w,QString l);


    void on_pushButton_enable_clicked();

    void on_pushButton_disable_clicked();

    void on_pushButton_Emagen_clicked();

    void on_pushButton_EReset_clicked();

    void on_comboBox_currentIndexChanged(int index);

    void on_doubleSpinBox_speed_valueChanged(double arg1);

    void on_doubleSpinBox_2_valueChanged(double arg1);

    void on_doubleSpinBox_valueChanged(double arg1);

    void on_comboBox_jogmode_currentIndexChanged(int index);

    void on_pushButton_j1_left_pressed();

    void on_pushButton_j1_right_pressed();

    void on_pushButton_j2_left_pressed();

    void on_pushButton_j3_left_pressed();

    void on_pushButton_j4_left_pressed();

    void on_pushButton_j5_left_pressed();

    void on_pushButton_j6_left_pressed();

    void on_pushButton_j2_right_pressed();

    void on_pushButton_j3_right_pressed();

    void on_pushButton_j4_right_pressed();

    void on_pushButton_j5_right_pressed();

    void on_pushButton_j6_right_pressed();

    void on_pushButton_x_left_pressed();

    void on_pushButton_y_left_pressed();

    void on_pushButton_z_left_pressed();

    void on_pushButton_a_left_pressed();

    void on_pushButton_b_left_pressed();

    void on_pushButton_c_left_pressed();

    void on_pushButton_x_right_pressed();

    void on_pushButton_y_right_pressed();

    void on_pushButton_z_right_pressed();

    void on_pushButton_a_right_pressed();

    void on_pushButton_b_right_pressed();

    void on_pushButton_c_right_pressed();

    void on_pushButton_pp_get_clicked();

    void on_pushButton_line_get_clicked();

    void on_pushButton_arc_get_pressed();

    void on_pushButton_arc_get_2_pressed();

    void on_pushButton_pp_run_clicked();

    void on_pushButton_line_run_clicked();

    void on_pushButton_arc_run_clicked();

    void on_pushButton_test_clicked();

    void on_pushButton_stop_clicked();

    void on_pushButton_clear_clicked();

    void on_pushButton_pro_clicked();

    void on_pushButton_return_clicked();

    void on_radioButton_loop_clicked();

    void on_radioButton_step_clicked();

    void on_pushButton_reload_clicked();

    void on_pushButton_prostatu_clicked();

    void on_checkBox_sim_clicked();

    void slot_scriptmessage(QString str);

    void on_pushButton_start_clicked();

    void on_pushButton_step_clicked();

    void on_radioButton_io1_clicked();

private:
    Ui::MainWindow *ui;
    QVector<double> currentJoint;
    QVector<double> currentPos;
    int currentmodel;
    QTimer* refrshtimer;
    bool _sim=1;
    Lua_script* script;
    CodeEditor *edit;

};
#endif // MAINWINDOW_H
